package model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;

@Entity
public class Project implements Serializable {

    @Id
    @GeneratedValue
    private int project_id;
    private String name = "";
    private String localfiles;
    private String purpose;
    private int user_id;
//@ManyToMany(targetEntity = Metric_User.class,cascade = {CascadeType.MERGE})
//@JoinTable(name="project_metric",joinColumns = {@JoinColumn(name="project_id")}, inverseJoinColumns = {@JoinColumn(name="metric_id")})
   /* @ManyToMany(targetEntity = Category.class, cascade = {CascadeType.PERSIST})
    @JoinTable(name = "project_category", joinColumns = {
        @JoinColumn(name = "project_id")}, inverseJoinColumns = {
        @JoinColumn(name = "category_id")})
    //private Set<Metric> metrics = new HashSet<Metric>();
private List<Category> category = new ArrayList<Category>();*/

    public void setName(String name) {
        this.name = name;
    }

    public void setLocalFiles(String localFiles) {
        this.localfiles = localFiles;
    }

    public void setPurpose(String purpose) {
        this.purpose = purpose;
    }

    public void setUserId(int user_id) {
        this.user_id = user_id;
    }

    public String getName() {
        return name;
    }

    public String getLocalFiles() {
        return localfiles;
    }

    public String getPurpose() {
        return purpose;
    }

    public int getUserId() {
        return user_id;
    }

    public int getProject_id() {
        return project_id;
    }

    /**
     * @param project_id the project_id to set
     */
    public void setProject_id(int project_id) {
        this.project_id = project_id;
    }

}
